<template>
  <section class="quick-actions">
    <h3>快速操作</h3>
    <div class="action-buttons">
      <a-button 
        type="primary" 
        size="large" 
        @click="handleActionClick('new-chat')"
      >
        <plus-outlined />
        新建聊天
      </a-button>
      <a-button 
        size="large" 
        @click="handleActionClick('search')"
      >
        <search-outlined />
        搜索联系人
      </a-button>
    </div>
  </section>
</template>

<script setup lang="ts">
import { defineEmits } from 'vue'
import { PlusOutlined, SearchOutlined } from '@ant-design/icons-vue'
import { Button } from 'ant-design-vue'

// 定义emits
const emit = defineEmits<{
  actionClick: [action: string]
}>()

const handleActionClick = (action: string): void => {
  emit('actionClick', action)
}
</script>

<style scoped>
.quick-actions {
  text-align: center;
  padding: 60px 40px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.quick-actions h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #1e293b;
}

.action-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-buttons .ant-btn {
  min-width: 200px;
  height: 56px;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.action-buttons .ant-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .quick-actions {
    padding: 40px 24px;
  }

  .quick-actions h3 {
    font-size: 24px;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .action-buttons .ant-btn {
    width: 100%;
    max-width: 320px;
  }
}
</style>